package com.ross.web.DTO;

public class ProductDTO {
	
		private String barcode;
		private String name;
		private String price;
		private int quantity;
		private String subTotal;
		private double priceDouble;
		
		public ProductDTO(){
			
		}

		public ProductDTO(String name, String price, int quantity, String barode, String subTotal, double priceDouble) {
			super();
			this.name = name;
			this.price = price;
			this.quantity = quantity;
			this.barcode = barode;
			this.subTotal = subTotal;
			this.priceDouble = priceDouble;
		}
		
		public double getPriceDouble(){
			return Double.valueOf(getPrice());
		}

		public String getSubTotal() {
			return subTotal;
		}

		public void setSubTotal(String subTotal) {
			this.subTotal = subTotal;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getPrice() {
			return price;
		}

		public void setPrice(String price) {
			this.price = price;
		}

		public int getQuantity() {
			return quantity;
		}

		public void setQuantity(int quantity) {
			this.quantity = quantity;
		}
			

		public double getTotalPrice(){
			return this.quantity * Double.valueOf(this.price);
		}
		
		public String getTotalPriceString(){
			return String.format("%.2f", getTotalPrice());
		}

		public String getBarcode() {
			return barcode;
		}

		public void setBarcode(String barcode) {
			this.barcode = barcode;
		}
		
		
		
}
